<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>imageThinking</title>
    <link href="../../css/bootstrap.css" type="text/css" media="screen" rel="stylesheet" />
		<link href="../../css/bootstrap-xadmin.css" type="text/css" media="screen" rel="stylesheet" />
    <script type="text/javascript" src="../../js/jquery.js"></script>
		<script type="text/javascript" src="../../js/echarts.common.min.js"></script>
		<script type="text/javascript" src="./dateRange.js"></script>
		<script type="text/javascript" src="./monthPicker.js"></script>
		<link rel="stylesheet" type="text/css" href="./dateRange.css"/>
		<link rel="stylesheet" type="text/css" href="./monthPicker.css"/>
    <style type="text/css">
        body.dashboard{
				background-color: #FBFBFB;
				/*font-family: "-apple-system-font,Helvetica Neue,PingFang SC,Microsoft YaHei,sans-serif";*/
				font-family: 400 1em/1.8 'Microsoft Yahei', 'PingFang SC', 'Avenir', 'Segoe UI', 'Hiragino Sans GB', STHeiti, 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;
			}
			ul,li{
				list-style:none;
			}
			a{
				color: #606266;
				display: block;
				text-decoration:none !important;
			}
			a:hover, a:focus{
				/*color: #428bca;*/
				color: #606266;
			}
			input:hover, input:focus{
				/*color: #428bca;*/
				border: none;
			}
			hr{
				margin: 20px 0px 10px;
			}
			input{
				outline：none !important;
				padding: 0;
			}
			input:hover, input:focus{
				outline：none !important;
			}
			.padding-left05{
				margin-left: 10px;
			}
			.mian-width {
				width: 1300px;
				margin: 0 auto;
			}
			.fs12{
				font-size: 12px;
			}
			.fs14{
				font-size: 14px;
			}
			.fs16{
				font-size: 16px;
			}
			.fw700{
				font-weight:700;
			}
			.c3{
				color: #606266;
			}
			.top-search-form {
				margin-top: 14px;
			}
			.navbar-brand{
				padding: 15px 0;	
			}
			.navbar{
				margin-bottom: 0;
			}
			.btn-login {
				border: 1px solid #fff;
				margin-right: 18px;
				padding: 5px 0 !important;
				text-align: center;
				color: #fff !important;
				width: 80px;
				font-size: 14px;
				display: inline-block;
				line-height: 1;
				white-space: nowrap;
				cursor: pointer;
				border-color: #dcdfe6;
				-webkit-appearance: none;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
				outline: none;
				-webkit-transition: .1s;
				transition: .1s;
				font-weight: 500;
				-moz-user-select: none;
				-webkit-user-select: none;
				-ms-user-select: none;
				border-radius: 4px;
				margin-top: 14px;
			}
			.btn-login:hover{
				background-color: #fff !important;
				color: #525cdc !important;
			}
			.btn-register:hover{
				background-color: #757de3 !important;
				color: #fff !important;
			}
			.btn-register {
				background-color: #525cdc;
				border-color: #525cdc;
			}
			.auth-body-warp{
				display: none;
			}
			.auth-body {
				background-color: rgba(0, 0, 0, 0.8);
				position: fixed;
				top: 0;
				bottom: 0;
				left: 0;
				right: 0;
				z-index: 1030;
				display: flex;
				align-items: center;
			}
			.body-middle {
				width: 100%;
				margin: 0 auto;
			}
			.body-middle form{
				display: flex;
				text-align: center;
				align-items: center;
			}
			.top-img {
				width: 100%;
				text-align: center;
				margin: 0 auto;
			}
			.panel-wrapper {
				width: 100%;
			}
			.panel {
				background-color: #fff;
				width: 440px;
				max-width: 100%;
				border: 1px solid #eee;
				border-radius: 10px;
				z-index: 100;
				padding: 30px 60px;
				margin: 20px auto;
			}
			.body-content{
				width: 1300px;
				margin: 75px auto 0;
			}
			.grabble{
				width: 100%;
			}
			.grabble-left{
				width: 80%;
				float: left;
				position: relative;
			}
			.grabble .grabble-input{
				width: 100%;
				height: 40px;
				padding: 0;
				text-indent: 90px;
				border:1px solid #dcdfe6;
				border-radius: 5px;
			}
			.grabble-rigth{
				width: 20%;
				float: left;
			}
			.grabble-button{
				display: inline-block;
				height: 40px;
				width: 80%;
				color:#fff;
				padding: 0;
				margin-left: 10px;
				text-align: center;
				line-height: 40px;
				font-size: 16px;
				border-radius: 5px;
			}
			.show-module{
				width: 100%;
				margin-left: -10px;
				position: relative;
			}
			.show-module li.outer-li{
				width: 14%;
				float: left;
				font-size: 14px;
				margin-left: 10px;
				margin-top: 20px;
				text-align: center;
				cursor:pointer;
				border-radius: 5px;
				position: relative;
			}
			.show-module li.outer-li a{
				height: 40px;
				border: 1px solid #dcdfe6;
				line-height: 40px;
				border-radius: 5px;
			}
			.select-a{
				text-align: left;
				text-indent: 0.5em;
				background:url(../../images/cxjt.png) no-repeat scroll 95% center transparent;
			    background-size: 15px 8px;
			    color: #606266;
			}
			.select-ul{
				position: absolute;
				top: 35px;
				width: 100%;
				margin: 10px auto;
				padding: 0;
				background-color: #fff;
				max-height: 300px;
				border: 1px solid #f5f7fa;
				border-radius: 5px;
				-moz-box-shadow:2px 2px 13px #919191; 
				-webkit-box-shadow:2px 2px 13px #919191; 
				box-shadow:2px 2px 13px #919191;
				overflow-y: auto;
				z-index: 100;
				display: none;
				color: #606266;
			}
			
			.select-ul li{
				height: 40px;
				line-height: 40px;
			}
			.select-ul li:hover{
				background-color: #f5f7fa;
			}
			.content-middle-ul{
				width: 100%;
				/*margin-left: -0.6%;*/
				margin-top: 20px;
			}
			.margin-top0{
				margin-top: 0;
			}
			.li-titel,.li-details-titel{
				font-weight: 600;
				font-size: 20px;
			}
			.li-heat{
				text-align: left;
			}
			.ul-warp{
				display: none;
			}
			.ul-li-details{
				background-color: rgba(0,0,0,0.8);
				z-index: 1030;
				position: fixed;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				display: flex;
				align-items: center;
			}
			.ul-li-details ul{
				width: 60%;
				margin: 0 auto;				
				background-color: #fff;
				border-radius: 10px;
			}
			.ul-li-details ul li{
				width: 100%;
				padding: 20px 0px;
				overflow: hidden;
				margin-left: -1.8%;
			}
			.ul-li-details ul li .close{
				float: right;
				width: 30px;
				height: 30px;
			}
			.li-details-titel{
				text-align: center;
				margin-top: 50px;
			}
			.li-details-img{
				width: 100%;
				margin: 20px auto;
			}
			.close-img{
				float: right;
				width: 30px;
				height: 30px;
				margin-right: -45px;
				margin-top: -10px;
			}
			.user-information{
				overflow: hidden;
				margin: 10px auto 0;
			}
			.user-information img{
				border-radius: 100%;
			}
			.user-color{
				color: #fff;
				text-align: center;
			}
			.grabble-select{
				width: 80px;
				position: absolute;
				top: 0px;
				min-height: 40px;
				left: 0px;
				background:url(../../images/cxjt.png) no-repeat scroll 95% center transparent;
			    background-size: 15px 8px;
			    padding: 0;
			}
			.grabble-select .outer-li {
				position: relative;
				min-height: 40px;
			}
			.grabble-select .outer-li .select-a{
				cursor:pointer;
				height: 40px;
				line-height: 40px;
			}
			.grabble-select .outer-li .select-ul{
				text-align: center;
				z-index: 110;
			} 
			.head-content{
				color: #606266;
				margin: 10px auto;
			}
			.new-head-content{
				color: #606266;
				margin: 10px auto 15px;
			}
			.single-page {
				position: absolute;
				width: 300px;
				padding: 15px 15px 0 15px;
				margin: 10px 10px 10px 0;
				border: 1px solid #d4d4d4;
				background-color: #fff;
				border-radius: 5px;
			}
			.mian-img-div{
				width:100%;
				text-align: center;
				border:1px solid #ccc;
				margin: 0px auto;
				border-radius: 5px;
				-moz-box-shadow:2px 2px 15px #c1c1c1; 
				-webkit-box-shadow:2px 2px 15px #c1c1c1; 
				box-shadow:2px 2px 15px #c1c1c1;
			}
			.mian-img{
				width: 96%;
				margin: 5px auto;
			}
			img.head-logo{
				width: 30px;
				height: 30px;
				border-radius: 50%;
				margin: 0px auto;
			}
			.head-content span{
				display: inline-block;
				height: 20px;
				margin-right: 10px;
				font-size: 12px;
			}
			span.span-right{
				cursor:pointer;
				text-align: right;
			}
			.heat-img{
				height: 15px;
				margin-top: -1px;
			}
			.clear{
				clear:both
			} 
			a.select-a:hover,a.select-a:focus{
				color: #333;
			}
			.collect-button{
				text-align: right;
			}
			.a-button{
				display: inline-block;
				width: 65px;
				height: 25px;
				border: 1px solid #d8d8d8;
				text-align: center;
				line-height: 25px;
				font-size: 12px;
				color: #606266;
				border-radius: 5px;
				margin-right: 10px;
			}
			.show-module li.outer-li .a-border-color{
				/*border:1px solid #428bca;*/
				/*color:#428bca;*/
			}
			.outer-li-alone input{
				width: 100%;
				height: 99%;
				border: none;
				opacity: 0;
			}
			.label-explain{
				width: 100%;
				/*overflow: hidden;*/
			}
			.label-explain-title{
				width: 50px;
				float: left;
				margin-top: 10px;
			}
			.label-explain-content{
				width: 90%;
				float: left;
			}
			.label-explain-content .span{
				color: #7c6fab;
				background-color: #e2e7ff;
				border: 1px solid #d8d8d8;
				padding: 1px 10px;
				border-radius: 50px;
				display: inline-block;
				margin-top: 10px;
				margin-left: 5px;
			}
			.label-explain-content span img{
				margin-left: 5px;
				cursor:pointer;
			}
			.calendar-bg{
				background: url(../../images/calendar.png) no-repeat 23px center;
			}
    </style>
</head>

<body class="dashboard">
<div id="top-nav" class="navbar navbar-xs navbar-inverse navbar-fixed-top">
    <div class="mian-width">
        <div class="navbar-header">
            <a class="navbar-brand" href="/index"><img src="../../images/icon.png"
                                                           style="margin-right: 5px"/></a>
        </div>
        <div class="navbar-collapse collapse" id="login_ul">
            <ul class="nav navbar-nav pull-right" id="loginUl">
                <li class="dropdown g-theme">
                    <a class="btn-login" id="btnLogin">
                        登录
                    </a>

                </li>
                <li class="dropdown g-theme">
                    <a class="btn-login btn-register" id="btnRegister">
                        注册
                    </a>

                </li>

            </ul>
            <ul class="nav navbar-nav pull-right" style="display:none;position: relative;" id="userList">
                <li class="dropdown user-information">
                    <img src="../../images/head.png" style="width: 30px;height: 30px;" id="show_list"/>
                    <div class="user-color" id="company_name"></div>
                </li>
                <ul style="display:none;position: absolute;padding: 0;background-color: #fff;max-height: 300px;border: 1px solid #f5f7fa;border-radius: 5px;-moz-box-shadow:2px 2px 13px #919191; -webkit-box-shadow:2px 2px 13px #919191; box-shadow:2px 2px 13px #919191;overflow-y: auto;z-index: 100;color: #606266;width: 150px;text-align: center;left:-46px;top:65px;"
                    id="buttonList">
                    <li style="line-height: 40px;height: 40px;font-size: 14px;">
                        <a style="display: block;" id="user_page">
                            <img src="../../images/YHXX.png"/>
                            用户信息
                        </a>
                    </li>
                    <li style="line-height: 40px;height: 40px;font-size: 14px;">
                        <a style="display: block;" id="collect_page">
                            <img src="../../images/sc.png" />
                            收藏列表
                        </a>
                    </li>
                    <li style="line-height: 40px;height: 40px;font-size: 14px;" id="out">
                        <a style="display: block;">
                            <img src="../../images/TCDL.png"/>
                            退出登录
                        </a>
                    </li>
                </ul>
            </ul>
        </div>
    </div>
</div>

<!--中间-->
<div class="body-content">
    <div class="body-content-top">
        <div class="grabble">
            <div class="grabble-left">
                <input type="text" Placeholder="输入你要找的东西" class="grabble-input"/>
                <ul class="grabble-select">
                    <li class="outer-li ">
                        <a class="select-a">
                            <span id="search">网址</span>
                        </a>
                        <ul class="search-select">
                            <li>网址</li>
                            <li>广告主</li>
                            <li>广告名称</li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="grabble-rigth">
                <a class="grabble-button btn-register">搜索</a>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <ul class="show-module" id="showModule">
        <li class="outer-li">
            <a class="outer-li-alone calendar-bg" id="date1">
                广告发布时间
            </a>
            <a class="opt_sel" id="input_trigger1" style="display: none;">
                <i class="i_orderd"></i>
            </a>

        </li>
        <li class="outer-li">
            <a class="outer-li-alone calendar-bg" id="date2">
                广告发布时间
            </a>
            <a class="opt_sel" id="input_trigger2" style="display: none;">
                <i class="i_orderd"></i>
            </a>
            </a>
        </li>
        <li class="outer-li">
            <a class="select-a">
                <span id="industry">行业</span>
            </a>
            <ul class="select-ul">
                <li>行业</li>
                <li>电商</li>
                <li>金融</li>
                <li>游戏</li>
                <li>房产</li>
                <li>生活服务</li>
                <li>教育学习</li>
                <li>招商加盟</li>
                <li>家具装修</li>
            </ul>
        </li>
        <li class="outer-li">
            <a class="select-a">
                <span id="app_from">平台</span>
            </a>
            <ul class="select-ul">
                <li>平台</li>
                <li>网易新闻</li>
                <li>鲨鱼浏览器</li>
                <li>腾讯新闻</li>
                <li>百度信息流</li>
                <li>腾讯网页</li>

                <li>爱奇艺</li>
                <li>东方头条</li>
                <li>喜马拉雅FM</li>
                <li>手机新浪网</li>
                <li>新浪新闻</li>

                <li>UC头条</li>
                <li>手机网易网</li>
                <li>搜狐新闻</li>
                <li>虎扑APP</li>
                <li>美柚</li>

                <li>知乎</li>
                <li>墨迹天气</li>
                <li>凤凰新闻</li>
                <li>哔哩哔哩</li>
                <li>一点资讯</li>

                <li>WIFI万能钥匙</li>
                <li>惠头条</li>
                <li>百度APP</li>
                <li>懂球帝</li>
                <li>猎豹浏览器</li>
            </ul>
        </li>
        <li class="outer-li">
            <a class="select-a">
                <span id="put_type">投放类型</span>
            </a>
            <ul class="select-ul">
                <li>投放类型</li>
                <li>图文</li>
                <li>视频</li>
            </ul>
        </li>
        <li class="outer-li">
            <a class="select-a">
                <span id="put_goal">投放目标</span>
            </a>
            <ul class="select-ul">
                <li>投放目标</li>
                <li>下载</li>
                <li>注册</li>
                <li>加粉</li>
                <li>表单</li>
                <li>产品销售</li>
            </ul>
        </li>


    </ul>
    <div class="clear"></div>
    <hr/>
    <div class="label-explain" id="labelExplain">
        <div class="label-explain-title">标签：</div>
        <div class="label-explain-content">

            <span class="fs12" id="foundTime">

            </span>
            <span class="fs12" id="finallyTime"></span>
            <!--<span class="fs12">广告发布时间：2010/10/10 <img src="../../images/x.png"/></span>-->
            <!--<span class="fs12">广告发布时间：2010/10/10 <img src="../../images/x.png"/></span>-->


        </div>
    </div>
    <div class="clear"></div>
</div>
<div class="clear"></div>
<hr/>
<div class="clear"></div>

<div class="body-content margin-top0" style="display: block;">
    <div class="body-content-middle">
        <div class="content-middle-ul" id="list-ul">

        </div>
    </div>
</div>
<div class="ul-warp">
    <div class="ul-li-details">
        <ul>
            <li>
                <img src="../../images/colse2.png" class="close" id="liClose"/>
                <div class="li-details-titel">我是标题</div>
                <img src="../../images/1.jpeg" class="li-details-img"/>
                <div class="li-details-heat">热度，点赞数</div>
            </li>
        </ul>
    </div>
</div>

<div class="auth-body-warp">
    <div class="auth-body">
        <div class="body-middle">
            {#            <form action="" method="">#}
            <div class="panel panel-default panel-single" id="panel-login">
                <img src="../../images/colse2.png" class="close-img" id="login-close"/>
                <div class="panel-heading">
                    <p style="text-align: center;margin-top: 15px">
                        <img src="../../images/logo.png"/>
                    </p>
                </div>
                <div class="panel-body">

                    <div id="div_id_username" class="row">
                        <div class="controls clearfix">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
                                <input class="form-control input-lg" id="login_mobile" maxlength="254"
                                       name="login_mobile" type="text" placeholder="手机号">
                            </div>
                        </div>
                    </div>
                    <div id="div_id_password" class="row">
                        <div class="controls clearfix">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span>
                                <input class="form-control input-lg" id="login_code" name="login_code"
                                       type="number" placeholder="验证码">
                                <input type="text" value="获取验证码"
                                       style="position: absolute;height: 43px;padding: 10px 0px;width: 90px;font-size: 14px;text-align: center;left: 198px;top:1px;cursor:pointer;"
                                       readonly="" id="gainCode"/>
                            </div>

                        </div>
                    </div>
                    <input type="hidden" name="next" value="/admin/"/>
                    <button class="btn btn-lg btn-primary btn-block" name="mobile_login" id="mobile_login"
                            type="submit">登录
                    </button>
                    <div class="text-info" style="margin-top:15px;">
                        <a href="javasrcipt:;"><i class="fa fa-question-sign"></i> 忘记了您的密码或用户名？</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="auth-body-warp-register" style="display: none;">
    <div class="auth-body">
        <div class="body-middle">
            {#            <form action="/register/" method="post" id="register-form">#}
            <div class="panel panel-default panel-single" id="panel-register">
                <img src="../../images/colse2.png" class="close-img" id="login-close-register"/>
                <div class="panel-heading">
                    <p style="text-align: center;margin-top: 15px">
                        <img src="../../images/logo.png"/>
                    </p>
                </div>
                <div class="panel-body">
                    <div id="div_id_username" class="row">
                        <div class="controls clearfix">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
                                <input class="form-control input-lg" maxlength="254" id="company_name"
                                       name="company_name" type="text"
                                       placeholder="企业名称">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="controls clearfix">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
                                <input class="form-control input-lg" maxlength="254" id="principal" name="principal"
                                       type="text"
                                       placeholder="负责人">
                            </div>

                        </div>
                    </div>
                    <div class="row">
                        <div class="controls clearfix">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
                                <input class="form-control input-lg" maxlength="11" id="regist_mobile"
                                       name="regist_mobile"
                                       type="text"
                                       placeholder="手机号">
                            </div>

                        </div>
                    </div>
                    <div id="div_id_password" class="row">
                        <div class="controls clearfix">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span>
                                <input class="form-control input-lg" id="regist_code" name="regist_code"
                                       type="number"
                                       placeholder="验证码">
                                <input type="text" value="获取验证码"
                                       style="position: absolute;height: 43px;padding: 10px 0px;width: 90px;font-size: 14px;text-align: center;left: 198px;top:1px;cursor:pointer;"
                                       readonly="" id="zphone"/>
                            </div>
                        </div>
                    </div>
                    <button class="btn btn-lg btn-primary btn-block" type="submit" id="regist_by_mobile"
                            name="regist_by_mobile">注册
                    </button>
                </div>
            </div>
            {#            </form>#}
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="../../js/jquery.ui.core.js"></script>
	<script type="text/javascript" src="../../js/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="../../js/jquery.ui.mouse.js"></script>
	<script type="text/javascript" src="../../js/jquery.ui.sortable.js"></script>
	<script type="text/javascript" src="../../js/bootstrap.js"></script>
	<script type="text/javascript" src="../../js/xadmin.main.js"></script>
	<script type="text/javascript" src="../../js/xadmin.responsive.js"></script>
	<script type="text/javascript" src="../../js/jquery.ui.effect.js"></script>
	<script type="text/javascript" src="../../js/xadmin.plugin.themes.js"></script>
	<script type="text/javascript" src="../../js/xadmin.page.dashboard.js"></script>
	<script type="text/javascript" src="../../js/xadmin.plugin.portal.js"></script>
	<script type="text/javascript" src="./jquery.freetile.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#btnLogin").click(function () {
            $(".auth-body-warp").show();
        })

        $("#login-close,#login-close-register").click(function () {
            $(".auth-body-warp,.auth-body-warp-register").hide();
        })

        $("#btnRegister").click(function () {
            $(".auth-body-warp-register").show();
        })

        $(document).on("click", function () {
            $(".select-ul").slideUp();
            $(".search-select").slideUp();
             

        })

        $(document).on("click", ".select-ul li", function () {
            not_add = "false"
            var thisConten = $(this).text();
            $('.label-explain-content span').each(function () {
                if ('fs12 span' == $(this).eq().context.className) {
                    if (thisConten == $(this).context.innerText.replace(' ', '')) {
                        alert('已选相同标签！')
                        not_add = true
                        return
                    }

                }

            })
            if (not_add == true) {
                return
            }
            select_type = $(this).parent($(ul)).children()[0].innerHTML
            if (thisConten == '平台' || thisConten == '行业' || thisConten == '投放类型' || thisConten == '投放目标') {
                return
            }
            $(".label-explain-content").append('<span class="fs12 span" data="' + select_type + '">' + thisConten + ' <img src="../../images/x.png"/ class="img-click"></span>')
            sessionStorage.setItem('page', 0);
            $('.single-page').remove()
            createLi()
        })

        $(".outer-li .outer-li-alone").click(function () {
//				$(this).css({border:"1px solid #428bca",color:"#428bca"})
//				$(this).parent().addClass("a-border-color");
//				$(this).addClass("a-border-color");
//				$(this).siblings('li').removeClass('selected');
        })

        var dateRange1 = new pickerDateRange('date1', {
            isTodayValid: true,
            startDate: '广告发布时间',
            endDate: '',
            needCompare: false,
            defaultText: ' 至 ',
            autoSubmit: true,
            inputTrigger: 'input_trigger1',
            theme: 'ta',
            success: function (obj) {
//						$("#dCon2").html('开始时间 : ' + obj.startDate + '<br/>结束时间 : ' + obj.endDate);
                $("#foundTime").html('<span class="fs12 span" id="public_time">广告发布时间: ' + obj.startDate + '~' + obj.endDate + ' <img src="../../images/x.png" class="img-click"/></span>');
                $("#date1").html('广告发布时间');
                $('.single-page').remove()
                createLi()
            }
        });

        var dateRange1 = new pickerDateRange('date2', {
            isTodayValid: true,
            startDate: '广告发现时间',
            endDate: '',
            needCompare: false,
            defaultText: ' 至 ',
            autoSubmit: true,
            inputTrigger: 'input_trigger2',
            theme: 'ta',
            success: function (obj) {
//						$("#dCon2").html('开始时间 : ' + obj.startDate + '<br/>结束时间 : ' + obj.endDate);
                $("#finallyTime").html('<span class="fs12 span" id="discover_time">广告发现时间: ' + obj.startDate + '~' + obj.endDate + ' <img src="../../images/x.png" class="img-click"/></span>');
//						$(".label-explain-content").append('<span class="fs12">广告发布时间: '+ obj.startDate +' <img src="../../images/x.png"/></span>');
                $("#date2").html('广告发布时间');
            }
        });
    })

    var wrap = document.querySelector("#list-ul");
    var ul = document.querySelectorAll("#list-ul ul"); //声明元素块
    //	//创建一个滚动事件
    sessionStorage.setItem('page', 0);

    function createLi() {

        public_time = $('#public_time').text()
        discover_time = $('#discover_time').text()
        if (public_time != '' || public_time != ' ') {
            public_time = public_time.replace('广告发布时间: ', '').replace(' ', '')
        }
        if (discover_time != '' || discover_time != ' ') {
            discover_time = discover_time.replace('广告发现时间: ', '').replace(' ', '')
        }
        industry = ''
        app_from = ''
        put_type = ''
        put_goal = ''
        $('.label-explain-content span').each(function () {
            if ('fs12 span' != $(this).eq().context.className) {
                return
            }
            if ($(this).attr("data") == '行业') {
                industry = industry + $(this).text() + ','
            } else if ($(this).attr("data") == '平台') {
                app_from = app_from + $(this).text() + ','
            } else if ($(this).attr("data") == '投放类型') {
                put_type = put_type + $(this).text() + ','
            } else if ($(this).attr("data") == '投放目标') {
                put_goal = put_goal + $(this).text() + ','
            }
        })
        search_select = $('#search').text()
        search_text = $('.grabble-input').val()
        page = parseInt(sessionStorage.getItem('page')) + 1

        //session存储分页信息
        sessionStorage.setItem('page', page)
        var tooken = getCookie('tooken')
        $.ajax({
            url: 'jsondata.json',
            type: 'get',
            headers: {
                Accept: "application/json; charset=utf-8",
                Authorization: "Bearer " + tooken
            },
            data: {
                page: page,
                pageSize: 10,
                public_time: public_time,
                discover_time: discover_time,
                search_select: search_select,
                search_text: search_text,
                industry: industry,
                app_from: app_from,
                put_type: put_type,
                put_goal: put_goal
            },
            success: function (data) {
                console.log("sss")
                if (data.json_data.length == 0) {
                    alert("暂无搜索结果")
                    return
                }
                appendLi(data)
                $("#list-ul").freetile({animate: true, elementDelay: 0});
            }
        })


    }

    function appendLi(data) {
        console.log(data.json_data)
        for (i = 0; i < data.json_data.length; i++) {
            collectImg = "../../images/x1.png"
            if (data.json_data[i].is_collect == 1) {
                collectImg = "../../images/x2.png"
            }
            var text = '<div class="single-page">\
		          		<div class="collect-button">\
							<span class="span-right" id="spanRight">\
								<div class="a-button"><a href="' +data.json_data[i].url+ '">详&nbsp情</a></div>\
								<div class="more a-button" id=' + data.json_data[i].id + '><a >更&nbsp多</a></div>\
								<img src="' + collectImg + '" class="heat-img" id="heatImg" style="width: 25px;height: 25px;"/ >\
							</span>\
						</div>\
						<hr />\
			            <div class="li-titel">\
			              <img src=' + data.json_data[i].logo + ' class="head-logo" / >\
			              <span class="fw700 c3 fs16 padding-left05">' + data.json_data[i].app_from + '</span>\
			            </div>\
			            <a href="' + data.json_data[i].url + '">\
			            	<div class="head-content fs14">' + data.json_data[i].title + '</div>\
				            <div class="mian-img-div">\
				            	<img src="' + data.json_data[i].img + '" class="mian-img"/>\
				            </div>\
			            </a>\
			            <div class="li-heat head-content">\
			            	<span><img src="../../images/1.png" class="heat-img"/ > ' + data.json_data[i].like_count + '</span>\
			            	<span><img src="../../images/2.png" class="heat-img"/ > ' + data.json_data[i].discover_count + '</span>\
			            	<span><img src="../../images/3.png" class="heat-img"/ > ' + data.json_data[i].share_count + '</span>\
			            </div>\
					</div>';
            $("#list-ul").append(text);
        }
    }


    createLi()


    $(window).scroll(function () {
        var scrollTop = $(this).scrollTop();
        var scrollHeight = $(document).height();
        var windowHeight = $(this).height();
        if (scrollTop + windowHeight == scrollHeight) {
            var tooken = getCookie("tooken")
            if (tooken != "") {
                var token_split = getCookie("tooken").split('.')
                var payload = token_split[1]
                var str = Base64.decode(payload);
                var str1 = unescape(str.replace(/\\u/g, '%u'))
                var obj = JSON.parse(str1);
                createLi();
            }
            else {
                alert("登录后加载更多！")
            }

        }
    });


    $(document).on("click", "#heatImg", function () {

        if (getCookie("tooken") == "") {
            return
        }


        var imgUrl = '../../images/x1.png';
        var newImgUrl = $(this).attr("src");
        if (imgUrl == newImgUrl) {      //收藏
            title = $(this).parent($("span")).parent("div").parent("div").children("a")[0].innerText
            $.ajax({
                url: 'jsondata.json',
                type: 'post',
                dataType: "json",
                data: {
                    title: title,
                    csrfmiddlewaretoken: '{{ csrf_token }}',
                },
                success: function (data) {

                    console.log(data.json_data)
                    var collected = "collected"
                    if (data.json_data != collected) {
                    }
                }

            })

            $(this).attr("src", "../../images/x2.png");
        } else {        //取消收藏

            title = $(this).parent($("span")).parent("div").parent("div").children("a")[0].innerText
            $.ajax({
                url: 'jsondata.json',
                type: 'post',
                dataType: "json",
                data: {
                    title: title,
                    csrfmiddlewaretoken: '{{ csrf_token }}',
                },
                success: function (data) {
                    console.log(data.json_data)
                    var deleted = "deleted"
                    if (data.json_data != deleted) {
                        alert("error")
                    }
                }

            })
            $(this).attr("src", "../../images/x1.png");
        }
    })


    var t1 = null;

    function countdown(obj) {
        var count = 60;
        $(obj).css({background: '#fff'}).val(count.toString() + "秒").attr('disabled', 'disabled');

        var doCount = function () {
            if (--count < 1) {
                var t2 = clearInterval(t1);
                $(obj).css({background: '#fff'}).val('重新发送').removeAttr('disabled');
            }
            else {
                $(obj).val(count.toString() + "秒");
            }
        };

        t1 = setInterval(function () {
            doCount();
        }, 1000);

    }

    $("#gainCode").click(function () {
        countdown($("#gainCode"));
    })

    $(document).on("click", ".img-click", function () {

        $(this).parent($("span")).remove()

    })

    var t1 = null;

    function countdown(obj) {
        var count = 60;
        $(obj).css({background: '#fff'}).val(count.toString() + "秒").attr('disabled', 'disabled');

        var doCount = function () {
            if (--count < 1) {
                var t2 = clearInterval(t1);
                $(obj).css({background: '#fff'}).val('重新发送').removeAttr('disabled');
            }
            else {
                $(obj).val(count.toString() + "秒");
            }
        };

        t1 = setInterval(function () {
            doCount();
        }, 1000);

    }

    $("#gainCode").click(function () {
        var re = /^1[345678]\d{9}$/; //校验手机号
        if (re.test($('#login_mobile').val())) {
            //发送验证码
            countdown($("#gainCode"));
            $.get('/user/send_message', {
                mobile: $('#login_mobile').val(),
            }, function (msg) {
                console.log(msg)
                if (msg.msg == '提交成功') {
                    countdown();
                }
            });
        }
        else {
            alert("请输入正确的手机号！")
        }
    })

    $('#zphone').click(
        function () {
            var re = /^1[345678]\d{9}$/; //校验手机号
            if (re.test($('#regist_mobile').val())) {
                //发送验证码
                countdown($("#zphone"));
                $.get('/user/send_message', {
                    mobile: $('#regist_mobile').val(),
                    principal: $('#principal').val(),
                    company_name: $('#company_name').val(),
                    verification_code: $('#regist_code').val()
                }, function (msg) {
                    alert(msg.detail)
                    if (msg.msg == '提交成功') {
                        countdown();
                    }
                });
            }
            else {
                alert("请输入正确的手机号！")
            }
        })

    $('#mobile_login').click(
        function () {
            var re = /^1[345678]\d{9}$/; //校验手机号
            if (re.test($('#login_mobile').val())) {
                $.ajax({
                    type: "POST",
                    dataType: "json",
                    url: "jsondata.json",//url
                    data: {'mobile': $('#login_mobile').val(), 'code': $('#login_code').val()},
                    success: function (data) {
                        console.log(data.token)
                        var token_split = data.token.split('.')
                        console.log(token_split)
                        token = token_split[1]
                        var str = Base64.decode(token);
                        console.log(str)
                        setcookie("tooken", data.token)
                        refresh_page()
                    },
                    error: function (data) {
                        var response_text = eval('(' + data.responseText + ')');
                
                        alert(response_text.non_field_errors[0])
                    }
                })
            }
        })
    $('#regist_by_mobile').click(
        function () {
            var re = /^1[345678]\d{9}$/; //校验手机号
            if (re.test($('#regist_mobile').val())) {
                //发送验证码
                countdown($("#zphone"));
                $.get('/user/register', {
                    mobile: $('#regist_mobile').val(),
                    principal: $('#principal').val(),
                    company_name: $('#company_name').val(),
                    verification_code: $('#regist_code').val()
                }, function (msg) {
                    alert(msg.detail)
                    if (msg.msg == '提交成功') {
                        countdown();
                    }
                });
            }
            else {
                alert("请输入正确的手机号！")
            }
        })


    function refresh_page() {
        window.location.reload();
    }

    function setcookie(name, value) {
        //设置名称为name,值为value的Cookie
        var expdate = new Date();   //初始化时间
        expdate.setTime(expdate.getTime() + 60 * 30000);   //时间
        document.cookie = name + "=" + value + ";expires=" + expdate.toGMTString() + ";path=/";
        //即document.cookie= name+"="+value+";path=/";   时间可以不要，但路径(path)必须要填写，因为JS的默认路径是当前页，如果不填，此cookie只在当前页面生效！~
    }

    function getCookie(name) {
        var strcookie = document.cookie;//获取cookie字符串
        var arrcookie = strcookie.split("; ");//分割
        //遍历匹配
        for (var i = 0; i < arrcookie.length; i++) {
            var arr = arrcookie[i].split("=");
            if (arr[0] == name) {
                return arr[1];
            }
        }
        return "";
    }

    window.onload = function () {
        if (getCookie("tooken") != "") {
            var token_split = getCookie("tooken").split('.')
            console.log(token_split)
            var payload = token_split[1]
           
            var str = Base64.decode(payload);
      
         
            var str1 = unescape(str.replace(/\\u/g, '%u'))
          
            var obj = JSON.parse(str1);
            $('#loginUl').css('display','none')
            $('#company_name').html(obj.company_name);
            $('#userList').css('display','block');

            
            setcookie('tooken', getCookie("tooken"))

        }
    }
    $(document).on("click", ".outer-li .select-a", function (e) {
        e.stopPropagation();
        $(".select-ul").slideUp();
        $(".search-select").slideUp();
        $(this).next(".search-select").slideToggle();
        $(this).next(".select-ul").slideToggle();
    })


    $(document).on("click", ".more", function () {
        title = $(this).parent($("span")).parent("div").parent("div").children("a")[0].innerText
        id = $(this).attr('id')

//      window.open("/index_details?id=" + id);
    })


    //获取token信息
    function get_payLoad() {
        if (getCookie("tooken") != "") {
            var token_split = getCookie("tooken").split('.')
            console.log(token_split)
            var payload = token_split[1]
            var str = Base64.decode(payload);
            var str1 = unescape(str.replace(/\\u/g, '%u'))
            var payLoad = JSON.parse(str1);
            return payLoad
        } else {
            return null
        }
    }

    $(document).on("click", function (e) {

            $('#buttonList').slideUp();

        })
    $("#userList").click(function(e){
          e.stopPropagation();
          $("#buttonList").slideToggle();
        })
    //收藏页面
    $('#collect_page').click(function () {

        window.open("/collection")
    })
    //用户信息页面
    $('#user_page').click(function () {
        window.open("/user_page")
    })

    //退出登录
  


</script>
</html>